package com.example.hasee.addinfo;

import com.example.hasee.data.DataStore;
import com.example.hasee.data.entity.School;

public class AddInfoPresenter implements AddInfoContract.Presenter{
    private AddInfoContract.View rootView;
    private DataStore mDataStore;

    public AddInfoPresenter(AddInfoContract.View rootView) {
        this.rootView = rootView;
        mDataStore=DataStore.getINSTANCE();
    }

    @Override
    public void addInfo(String name, String no, String subject, String year, String group) {
        School school=new School();
        school.setName(name);
        school.setNo(no);
        school.setSubject(subject);
        school.setYear(year);
        school.setGroup(group);
        mDataStore.addSchool(school);
    }
}
